class PrimeSeries
	{
	public static int[] genPrime(int n)
		{
		int i=0,m=0;
		int[] a = new int[n];
		while(i<n)
			{
			int j=1,count=0;
			while(j<=i)
				{
				if(i%j==0 && count<=2)
					count++;
				j++;
				}
			if(count==1 || count==2)
				{
				a[m]=i;
				m++;
				}
			i++;
			}
		return a;
		}
	}